package com.sub.spark.sql.source;

import org.apache.spark.sql.SparkSession;

/**
 * @ClassName ParquetSource
 * @Description: 从Parquet文件读取数据，parquet文件是列式存储，读取速度快
 * @Author Submerge.
 * @Since 2025/5/24 19:38
 * @Version 1.0
 */
public class ParquetSource {

    public static void main(String[] args) {

        SparkSession sparkSession = SparkSession.builder().appName("sub-spark-parquet").master("local[2]").getOrCreate();

        sparkSession.read().parquet("data/demo/spark/user.parquet").show();



        sparkSession.stop();
    }
}
